from .cos import *
from .MinIO import *


class S3:
    def __init__(self):
        pass

    def get_bucket_list(self) -> list:
        return minio_get_bucket_list()

    def create_bucket(self, bucket_name: str) -> bool:
        return True
        if self.check_bucket_exists(bucket_name):
            return True
        return minio_create_bucket(bucket_name)

    def delete_bucket(self, bucket_name: str) -> bool:
        # return minio_delete_bucket(bucket_name)
        return True

    def check_bucket_exists(self, bucket_name: str) -> bool:
        return minio_check_bucket_exists(bucket_name)

    def get_object_tags(self, bucket: str, key: str) -> dict | None:
        return minio_get_object_tags(key)

    def get_object_metadata(self, bucket: str, key: str) -> dict | None:
        return minio_get_object_metadata(key)

    def check_exists(self, bucket: str, key: str) -> bool:
        return minio_get_object_metadata(key)

    def presigned_upload_url(
        self, bucket: str, key: str, expires_in: int = 60
    ) -> str | None:
        return minio_get_presigned_upload_url(key, expires_in, bucket)

    def presigned_download_url(
        self, bucket: str, key: str, expires_in: int = 60
    ) -> str | None:
        return minio_get_presigned_download_url(key, expires_in, bucket)
